1. Field of the Invention
The present invention relates to an image processing apparatus and image processing method of performing sub-pixel processing on a gray-scale image obtained by imaging a detection-target subject with an image pickup device to detect an edge of the detection-target subject.
2. Description of the Related Art
Some image pickup devices, such as CMOS sensors, have a line defect in either one or both of horizontal and vertical directions. With an increase in size of an image pickup device (an increase in the number of pixels), the ratio of image pickup devices having a line defect is increasing. If these image pickup devices having a line defect are all taken as defective pieces, yields are decreased as the size of the image pickup device is increased, thereby increasing production cost. For this reason, image pickup devices having a line defect are also used in image processing apparatuses.
However, since an imaged signal cannot be captured at a portion with a line defect in an image pickup device, if an edge of detection-target subject overlaps the line-defect portion, the edge of the detection-target subject cannot be accurately detected.
As a measure to address the problem, as described in Japanese Unexamined Patent Application Publication No. 2006-148351, the image pickup device or the detection-target subject is configured to be rotated about a predetermined axis at a predetermined angle, and data of a defective pixel in an imaged image obtained by imaging with the image pickup device before rotation at the predetermined angle is replaced by data of a corresponding pixel in the imaged image obtained by imaging with the image pickup device after rotation at the predetermined angle, thereby performing data correction on the defective pixel.
However, in the defective-pixel correcting method described in the gazette above, imaging is required to be performed twice for image processing on one detection-target subject, disadvantageously taking a long time for image processing and decreasing productivity.